# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>

pkgname=python-uritemplate
pkgver=4.1.1
pkgrel=2
pkgdesc="a Python implementation of RFC6570"
arch=('any')
url="https://uritemplate.readthedocs.io/"
license=('Apache' 'BSD')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/sigmavirus24/uritemplate/archive/${pkgver}.tar.gz")
sha256sums=('64cae94edd83bbb0c2c49b15f2cb8192c3f8492af6bc468211d1e8b8496f5791')

build() {
  cd "$srcdir"/uritemplate-${pkgver}
  python setup.py build
}

package() {
  cd "$srcdir"/uritemplate-${pkgver}

  python setup.py install --skip-build --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  install -Dm644 LICENSE.APACHE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.APACHE
  install -Dm644 LICENSE.BSD "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.BSD
}
